#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int count = 0;
	int arr[1001] = {0};
	int n = 0;
	int b = 0;
	int c = 1;
	while (c<=arr[0]+1)
	{
		scanf("%d", &n);
		arr[b] = n;
		b++;
		c++;
	}
	for (int i = 1; i <= arr[0]-1; i++)
	{
		for (int t = 1; t <= arr[0]; t++)
		{
			int a = abs(arr[t] - arr[t + 1]);
			if ( a == i)
			{
				count++;
				break;
			}
		}
	}
	if (count == arr[0] - 1)
	{
		printf("Jolly");
	}
	else
	{
		printf("Not jolly");
	}
	return 0;
}